home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d3
/
allmac21.arc
/
SET10.ARC
/
SET10.QM
< prev
Wrap
Text File
|
1990-08-27
|
2KB
|
41 lines
* Macro To Get Dos Envirnoment Variable, v1.0
* SET10.QM
*
* This QEdit macro will access a Dos environment variable. To run,
* press Alt_0 and the variable and it's name will show highlighted on
* the screen. Press 'Enter' to remove from the screen. This macro is
* based on a suggestion how to do this from Tim Farley of SemWare.
* Change 'COMSPEC' below to the variable you wish to find. Replacing
* "COMSPEC" altogether with 'pause' will allow the user to input enough
* letters for the command to be found. The macro will also run faster
* if 'C:' below is changed to a ram disk. Compile the changed macro
* with QMAC.
*
@0 macrobegin
unmarkblock * get ready
dropanchor * mark file to return
editfile "c:$" return quit * quit tempfile from ring
gotoblockbeg * go back to mark
unmarkblock * remove
dos "set>c:$" * get SET to tempfile
return return *
editfile return * load tempfile
* find pause return return * input variable to find
find "COMSPEC" return return ** search for COMSPEC *change**
begline * go to found begin
dropanchor * start mark
endline * mark it all
copy * get to scrap
killfile * kill temp for next time
quit * remove temp from ring
begline * get ready to show variable
paste * show variable
pause * enter to remove
deleteblock * cleanup
makectrofscreen * for better viewing
*
* 51 bytes Tue 07-31-1990 22:52:01 input selected
* 64 bytes Tue 07-31-1990 22:52:53 with 'COMSPEC'
*..Tom Hogshead